<template>
  <el-menu :default-openeds="['1', '2']" style="min-height: 100%; overflow-x: hidden;"
           background-color="#6AAB9C"
           text-color="#ECF5FF"
           active-text-color="#FFE4C7"
           :collapse-transition="false"
           :collapse="isCollapse"
           router
  >
<!--style="height: 60px; line-height: 60px; text-align: center"-->
    <div style="height: 60px; line-height: 60px; text-align: center">
<!--      <img src="../assets/logo.png" alt="" style="width: 20px; position: relative; top: 5px; margin-right: 5px">-->
      <b style="color: #ECF5FF;font-family: 华文行楷; font-size: 23px" v-show="logoTextShow">线上问诊后台系统</b>
    </div>
<!--    <div v-for="item in menus" :key="item.id">
      <div v-if="item.path">
        <el-menu-item :index="item.path">
          <i :class="item.icon"></i>
          <span slot="title">{{ item.name }}</span>
        </el-menu-item>
      </div>
      <div v-else>
        <el-submenu :index="item.id + ''">
          <template slot="title">
            <i :class="item.icon"></i>
            <span slot="title">{{ item.name }}</span>
          </template>
          <div  v-for="subItem in item.children" :key="subItem.id">
            <el-menu-item :index="subItem.path">
              <i :class="subItem.icon"></i>
              <span slot="title">{{ subItem.name }}</span>
            </el-menu-item>
          </div>
        </el-submenu>
      </div>
    </div>-->
    <el-menu-item index="/home">
<!--      <template slot="title">-->
        <i class="el-icon-house"></i>
        <span slot="title">主页</span>
<!--      </template>-->
    </el-menu-item>

<!--        <el-menu-item index="2-1"><i class="el-icon-message"></i>主页</el-menu-item>-->
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-s-check"></i>
        <span slot="title">账户管理</span>
      </template>
        <el-menu-item index="/user">
          <i class="el-icon-s-custom"></i>
          <span slot="title">用户管理</span>
        </el-menu-item>
      <el-menu-item index="/physician">
        <i class="el-icon-user-solid"></i>
        <span slot="title">医师管理</span>
      </el-menu-item>
<!--      <el-menu-item index="/role">
        <i class="el-icon-user"></i>
        <span slot="title">角色管理</span>
      </el-menu-item>-->
      <!--<el-menu-item index="/menu">
        <i class="el-icon-user"></i>
        <span slot="title">菜单管理</span>
      </el-menu-item>-->
    </el-submenu>

    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">系统管理</span>
      </template>
      <el-menu-item index="/province">
        <i class="el-icon-position"></i>
        <span slot="title">省份管理</span>
      </el-menu-item>
      <el-menu-item index="/area">
        <i class="el-icon-s-promotion"></i>
        <span slot="title">市区管理</span>
      </el-menu-item>
      <el-menu-item index="/hospital">
        <i class="el-icon-s-help"></i>
        <span slot="title">医院管理</span>
      </el-menu-item>
      <el-menu-item index="/department">
        <i class="el-icon-s-data"></i>
        <span slot="title">科室管理</span>
      </el-menu-item>
      <el-menu-item index="/hosDep">
        <i class="el-icon-s-data"></i>
        <span slot="title">医院科室管理</span>
      </el-menu-item>
      <el-menu-item index="/disease">
        <i class="el-icon-s-finance"></i>
        <span slot="title">疾病管理</span>
      </el-menu-item>
      <el-menu-item index="/information">
        <i class="el-icon-document-copy"></i>
        <span slot="title">文章管理</span>
      </el-menu-item>
    </el-submenu>

    <el-submenu index="4">
      <template slot="title">
        <i class="el-icon-data-analysis"></i>
        <span slot="title">业务管理</span>
      </template>
      <el-menu-item index="/appraise">
        <i class="el-icon-chat-line-round"></i>
        <span slot="title">评论管理</span>
      </el-menu-item>
      <el-menu-item index="/stage">
        <i class="el-icon-time"></i>
        <span slot="title">问诊时间管理</span>
      </el-menu-item>
      <el-menu-item index="/order">
        <i class="el-icon-tickets"></i>
        <span slot="title">订单管理</span>
      </el-menu-item>
      <el-menu-item index="/question">
        <i class="el-icon-question"></i>
        <span slot="title">问题管理</span>
      </el-menu-item>
      <el-menu-item index="/reply">
        <i class="el-icon-rank"></i>
        <span slot="title">回复管理</span>
      </el-menu-item>
    </el-submenu>
  </el-menu>
</template>

<script>
export default {
  name: "Aside",
  props: {
    isCollapse: Boolean,
    logoTextShow: Boolean,
    /*menus: Array*/
  },
  /*data() {
    return {
      menus: localStorage.getItem("admin") ? JSON.parse(localStorage.getItem("admin")).menus : [],
      opens: localStorage.getItem("admin") ? JSON.parse(localStorage.getItem("admin")).menus.map(v => v.id + '') : []
    }
  },
  created() {
    this.menus = JSON.parse(localStorage.getItem("admin")).menus
    console.log("数据")
    console.log(this.menus)
  }*/
}
</script>

<style scoped>
i {
  color: #ECF5FF;
}
</style>
